package com.example.demo.mapper;

import com.example.demo.entity.Schedule;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ScheduleMapper extends JpaRepository<Schedule,Integer> {
    @Query(name="compareEarlyTime",nativeQuery = true, value="select *  from schedule where schnum < :schnum and endtime <= :starttime")
    List<Schedule> compareEarlyTime(Integer schnum, String starttime);
}

